<!--
 * @Author: wangzhichiao<https://github.com/wzc570738205>
 * @Date: 2021-05-10 13:35:26
 * @LastEditors: wangzhichiao<https://github.com/wzc570738205>
 * @LastEditTime: 2021-05-12 21:06:06
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        background: black;
        color: #cccccc;
        text-align: center;
      }
      #c3 {
        background-image: url(./img.jpg);
        background-repeat: no-repeat;
      }
      div {
        border: 1px solid #444444;
        padding: 10px;
        margin: 10px;
      }
      #videobg {
        opacity: 0;
        position: absolute;
      }
    </style>
    <script src="./img.js"></script>
    <script src="./video.js"></script>
    <script>
      window.onload =  ()=> {
        processorImg.doLoad();
        processorVideo.doLoad()
      };
    </script>
  </head>
  <body>
    <div>
      <video
        id="video"
        src="./video.mp4"
        width="350"
        muted="true"
        controls="true"
        loop
      ></video>
      <video
        id="videobg"
        src="./sea.mp4"
        width="350"
        muted="true"
        autoplay="true"
        controls="true"
        loop
      ></video>
    </div>
    <div>
      <!-- 视频截图 -->
      <canvas id="c1" width="260" height="190"></canvas>
      <!-- 处理绿色像素为透明 -->
      <canvas id="c2" width="260" height="190"></canvas>
      <!-- 贴图至背景图上方 -->
      <canvas id="c3" width="260" height="190"></canvas>
    </div>
    <div>
      <!-- 视频截图 -->
      <canvas id="v1" width="260" height="190"></canvas>
      <!-- 处理绿色像素为透明 -->
      <canvas id="v2" width="260" height="190"></canvas>
      <!-- 贴图至背景图上方 -->
      <canvas id="v3" width="260" height="190"></canvas>
    </div>
  </body>
</html>
